<!DOCTYPE html>
<html>
  <head>
    <title>toArray.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript" src="../javascript/lib/jquery-1.9.1/jquery-1.9.1.min.js"></script>
	<script type="text/javascript">
		var winners = $("#winners li").toArray();
		/*reverse()方法用于颠倒数组中元素的顺序。*/
		winners = winners.reverse();
		for(var w in winners){
			document.write(w.innerHTML);
		}
	</script>
  </head>
  
  <body>
    <ol id="winners">
    	<li>Eddy Merckx</li>
    	<li>Bernard Hinault</li>
    	<li>andre leducq</li>
    	<li>Lance Armstrong</li>
    	<li>Mark Cavendish</li>
    	<li>Nicolas Frantz</li>
    </ol>
  </body>
</html>
